package cn.le.InternalClass;

/**
 * Created by admin on 2017/5/11.
 * 递归父类
 */
public class SuperClass {

    public static void main(String[] args) {

        B b = new C();
        Class cal = b.getClass();
        outSuper(cal);

        System.out.println(cal.isPrimitive());//isPrimitive 判断是不是基础数据类型
        System.out.println(char.class.isPrimitive());
    }

    public static void outSuper(Class cla)
    {
        if(cla != null)
        {
            System.out.println(cla.getName());//打印全类名
            System.out.println(cla.getCanonicalName());//打印全类型名
            System.out.println(cla.getSimpleName());//打印间类名
            outSuper(cla.getSuperclass());
        }
    }

}
class A{

}
class B extends  A{

}
class C extends  B{

}